﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DK.ITree
{
    public abstract class TreeNode<TKey, TData> where TKey : IComparable
    {
        public TKey Key { get; private set; }

        public TData Value { get; set; }

        protected TreeNode(TKey key, TData value)
        {
            Key = key;
            Value = value;
        }
        public override string ToString()
        {
            return String.Format("{0}:[{1}]", Key, Value);
        }
    }
}
